package com.forekonw.demo7;

public class X {
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void Showinfo(){
        System.out.println("姓名" + this.getName()+"年龄" + this.getAge());
    }

    public static void main(String[] args) {
        X x = new X();
        x.setAge(20);
        x.setName("tom");
        x.Showinfo();
    }
}
